翻訳と辞書
Words near each other
・ Erse
・ Ersekë
・ Ersekë Stadium
・ Ersel Hickey
・ Ersen Martin
・ Ersentilide
・ Ersephila
・ Ersfeld
・ Ersfjordbotn
・ Ersguterjunge
・ Ersguterjunge Sampler Vol. 2 – Vendetta
・ Ersha Island
・ Ershad
・ Ershad Yousefi
・ Ershausen/Geismar
Ershove Number
・ Ershui Station
・ Ershui, Changhua
・ Ersi
・ Ersi Rural District
・ Ersi, Jolfa
・ Ersi, Marand
・ Ersi, West Azerbaijan
・ Ersigen
・ Ersilia
・ Ersilia mediterranea
・ Ersilia stancyki
・ Ersilio Tonini
・ Ersin
・ Ersin Demir


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Ershove Number : ウィキペディア英語版
Ershove Number

Ershov numbers are used in code optimization to minimize the amount of register allocations. Method can be used to optimally select registers when there is only one expression in a code block. Given an expression E = E1 ''op'' E2 the goal is to generate code so as to either minimize the number of registers used, or, if an insufficient number of registers is available, to minimize the number of nonregister temporaries required.
The Ershov number ''n'' of a node in given expression tree is defined as follows:
# Every leaf has ''n'' = 1.
# For a node with one child, ''n'' is the same as child's.
# For a node with two children, ''n'' is defined as:
::: n = max(child_1, child_2), if child_1 \ne child_2
::: n = child_1 + 1, if child_1 = child_2
The Ershov number of a node represents the minimum number of registers required to evaluate the subexpression whose root is that node. The idea is that we evaluate the child with the larger Ershov number first, then the other child, then perform the operation at the root.
== Example ==
Suppose we have an expression tree with a '+' operation at the root, and the left and right subtrees have Ershov numbers of 3 and 4, respectively. The Ershov number of this node is 4, so we should be able to generate code for the expression using 4 registers.
# Generate code to evaluate the right child using registers r1, r2, r3, and r4. Place the result in r1.
# Generate code to evaluate the left child using registers r2, r3, and r4. Place the result in r2.
# Issue the instruction "ADD r1, r2, r1".
What if there are not enough registers available? That is, if the Ershov number of the root of the expression tree is greater than the number of registers. We can still use the Ershov numbers to generate code using a minimal number of loads and stores, as follows:
# generate code for the child with the larger Ershov number
# issue an instruction to store the result in a temporary
# generate code for the child with the smaller Ershov number
# issue an instruction to load the temporary into a register
# issue an instruction to perform the operation at the root

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Ershove Number」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.